<template>
  <div class="container">
    <el-card shadow="always">
      <el-row :gutter="20">
        <el-col :span="4">
          <el-select
            v-model="query.negativeDateStr"
            placeholder=""
            :clearable="false"
          >
            <el-option
              v-for="item in ['2021','2022','2023']"
              :key="item"
              :label="item"
              :value="item"
            >
            </el-option>
          </el-select>
        </el-col>
        <el-col :span="2">
          <el-button
            type="primary"
            @click="
              query.pageIndex = 1;
              getList();
            "
            >搜索</el-button
          >
        </el-col>
      </el-row>
      <rz-height></rz-height>
      <el-table :data="tableData" border style="width: 100%">
        <el-table-column prop="negativeDateStr" label=" 扣分日期" width="100">
        </el-table-column>
        <el-table-column label="扣分类别" prop="pointsDeducted" width="100">
        </el-table-column>
        <el-table-column prop="classification" label="扣分分值" width="100">
        </el-table-column>
        <el-table-column prop="reasonDeduction" label="扣分原因及理由"> </el-table-column>
        <el-table-column
          prop="createUnitName"
          label="添加部门名称"
        ></el-table-column>
        <el-table-column
          prop="auditDateStr"
          label="审核日期"
          width="100"
        ></el-table-column>
        <el-table-column
          prop="auditPerson"
          label="审核人"
          width="100"
        ></el-table-column>
      </el-table>
      <pagination
        :total="total"
        @pagination="getList"
        :page.sync="query.pageIndex"
      />
    </el-card>
  </div>
</template>
<script>
import { findDeductionList } from "@/api/modules/enterprise";
export default {
  // props:[],
  // 页面加载
  created() {
    this.getList();
  },
  // 页面加载完成
  mounted() {},
  //实例销毁之前
  beforeDestroy() {},
  //实例销毁后
  destroyed() {},
  data() {
    return {
      query: {
        negativeDateStr: "2023",
        newLicenseNo: sessionStorage.getItem("newLicenseNo")||'--',
        pageIndex: 1,
        pageSize: 10,
      },
      tableData: [],
      total: 0,
      dialogVisible: false,
      data: {},
    };
  },
  // 方法
  methods: {
    getList() {
      findDeductionList(this.query).then((res) => {
        this.tableData = res.data.list;
        this.total = res.totalCount;
      });
    },
  },
  // 监听属性
  watch: {},
  // 组件
  components: {},
  // 计算属性
  computed: {},
};
</script>

<style lang="scss" scoped>
.icon-erweima {
  font-size: 40px;
}
</style>
